package com.yf.course.modules.course.dto.ext;

import com.yf.course.modules.course.dto.CourseFileDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
* <p>
* 课件学习数据传输类
* </p>
*
* @author 聪明笨狗
* @since 2020-12-17 11:28
*/
@Data
@ApiModel(value="课件学习报告", description="课件学习报告")
public class CourseLearnResultExtDTO extends CourseFileDTO {

    private static final long serialVersionUID = 1L;


    @ApiModelProperty(value = "全部学完", required=true)
    private Boolean all;

    @ApiModelProperty(value = "当前已学完", required=true)
    private Boolean current;

    @ApiModelProperty(value = "当前已学分钟数", required=true)
    private Long learnSec;

    @ApiModelProperty(value = "停止计时了", required=true)
    private Boolean stopped;

    @ApiModelProperty(value = "停止消息", required=true)
    private String stopMsg;

    @ApiModelProperty(value = "解锁课件", required=true)
    private String unlockFile;

    @ApiModelProperty(value = "剩余秒数", required=true)
    private Long leftSec;





    /**
     * 是否需要发消息提醒
     * @return
     */
    public boolean getEffect(){
        return (all!=null && all) || (current!=null && current);
    }
}
